import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router);

const Index = require('../components/index/Index.vue').default;
const Test = require('../components/index/Test.vue').default;

const CreateEntity = require('../components/create-entity/CreateEntity.vue').default;
const CreateMVC = require('../components/create-mvc/CreateMVC.vue').default;
const CreateMyBatis = require('../components/create-mybatis/CreateMyBatis.vue').default;
const CreateException = require('../components/create-exception/CreateException.vue').default;
const EntityToJSON = require('../components/entity-json/EntityToJSON.vue').default;
const ElementForm = require('../components/element-from/ElementForm.vue').default;

export default new Router({
    routes: [{
        path: '/',
        name: 'Index',
        component: Index
    }, {
        path: '/create/entity',
        name: 'CreateEntity',
        component: CreateEntity
    }, {
        path: '/create/mvc',
        name: 'CreateMVC',
        component: CreateMVC
    }, {
        path: '/create/mybatis',
        name: 'CreateMyBatis',
        component: CreateMyBatis
    }, {
        path: '/entity/JSON',
        name: 'EntityToJSON',
        component: EntityToJSON
    }, {
        path: '/create/exception',
        name: 'CreateException',
        component: CreateException
    }, {
        path: '/element/form',
        name: 'ElementForm',
        component: ElementForm
    }, {
        path: '/test',
        name: 'Test',
        component: Test
    }, {
        path: '*',
        redirect: '/'
    }]
})
